<script setup lang="ts">

import { mainStore } from "../../store/downLoadNotice"
import phoneFlag from '../../hooks/changePhoneFlag'
const phoneflag = phoneFlag(800)
const props = defineProps({
  //子组件接收父组件传递过来的值
  dialogVisible:{
    type:Boolean,
    default:true
  },

  content:String
})
const store = mainStore();
</script>

<template>

    <el-dialog v-model="props.dialogVisible" title="问卷下载"   :width="phoneflag?'80%':'30%'" :show-close="false" :close-on-click-modal="false"
        :close-on-press-escape="false">
        <div v-loading="(store.percentage===0)" element-loading-text="正在将数据转换成xlsx格式">
        <div v-if="(store.percentage!==0)">正在下载{{props.content}}问卷</div>
        <el-progress :percentage="store.percentage" v-if="(store.percentage!==0)"/>
        </div>
       
        <template #footer>
            <span class="dialog-footer">

            </span>
        </template>
    </el-dialog>
</template>
<style lang="scss" scoped>

</style>